[#9535] feat(api): introduce FUNCTION metadata object type and function privileges#10811
Open
mchades wants to merge 1 commit intoapache:mainfrom
Open
[#9535] feat(api): introduce FUNCTION metadata object type and function privileges#10811mchades wants to merge 1 commit intoapache:mainfrom
mchades wants to merge 1 commit intoapache:mainfrom
Conversation
…function privileges Add the FUNCTION MetadataObject.Type and three new privileges REGISTER_FUNCTION, EXECUTE_FUNCTION, and MODIFY_FUNCTION, together with the Privileges factory classes and SecurableObjects.ofFunction helper, following the model privilege design in design-docs/gravitino-function-privilege.md. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Code Coverage Report
Files
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Add the
FUNCTIONmetadata object type and three new function-level privileges(
REGISTER_FUNCTION,EXECUTE_FUNCTION,MODIFY_FUNCTION) to the Gravitinoauthorization API, following the design in
design-docs/gravitino-function-privilege.md.Key changes:
MetadataObject.Type.FUNCTION— new FUNCTION typePrivilege.Name.REGISTER_FUNCTION/EXECUTE_FUNCTION/MODIFY_FUNCTION— three new privilege namesPrivileges.RegisterFunction/ExecuteFunction/ModifyFunction— corresponding privilege classes with correct supported-type bindingsSecurableObjects.ofFunction()— convenience factory for function securable objectsMetadataObjects— FUNCTION added to valid three-level name typesWhy are the changes needed?
Gravitino manages user-defined functions (UDFs) but provides no access
control at the function level. This PR is the API foundation for
end-to-end function privilege enforcement.
Fix: #9535
Does this PR introduce any user-facing change?
MetadataObject.Type.FUNCTION,Privilege.Name.REGISTER_FUNCTION,EXECUTE_FUNCTION,MODIFY_FUNCTIONPrivileges.RegisterFunction,ExecuteFunction,ModifyFunctionclassesSecurableObjects.ofFunction(...)factory methodHow was this patch tested?
TestMetadataObjects.testFunctionObject— validates FUNCTION metadata object constructionTestSecurableObjects— new entries forcanBindToandmanageGrants FUNCTIONbinding./gradlew :api:test -PskipITs